#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main(void)
{
	int a = 0, i = 0, j = 0, n = 0, m = 0;
	while (scanf("%d", &a) == 1 && a != 0)
	{
		if (a % 2 == 0)
		{
			i++;
			j = j + a;
		}
		else
		{
			n++;
			m = (m + a) / n;
		}
	}
	printf("%d %d %d %d", i, j/i, n, m);

	return 0;
}